package com.zyb.microservice.application1.controller;

import com.zyb.microservice.api.ConsumerService;
import com.zyb.microservice.api.ProviderService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.PublicKey;

@RestController
public class Application1Controller {

    //通过dubbo远程调用service-1-api接口中的方法
    @Reference
    ConsumerService consumerService;

    @Reference
    ProviderService providerService;


  @GetMapping(value = "/service")
  public String service(){

      return consumerService.service()+"|test";
  }
    @GetMapping(value = "/provide")
  public String servive2(){
      return providerService.service()+"|test";
  }
}
